﻿using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using System;
using WalkingTec.Mvvm.Core;
using WalkingTec.Mvvm.Mvc;
using WalkingTec.Mvvm.Core.Extensions;
using SigMIS.ViewModel.Equipment.MapVMs;

namespace SigMIS.Controllers
{
    [Area("Equipment")]
    [ActionDescription("地图预览")]
    public partial class MapController : BaseController
    {
        [ActionDescription("显示")]
        public ActionResult Index()
        {
            var vm = Wtm.CreateVM<MapVM>();
    
            return PartialView(vm);
        }

        [ActionDescription("刷新线路")]
        public ActionResult RefreshRoadLines(MapVM vm)
        {
            vm.DoRefreshRoadLines();
            return FFResult().RefreshGrid();
        }
         
        [ActionDescription("选择线路")]
        public ActionResult SelectRoadLine(MapVM vm)
        {                
            vm.DoSelectRoadLine();
            return FFResult().RefreshGrid();    //.Alert(vm.SelectedRoadLine);            
        }          

    }
}
